/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package EntityClass;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;

/**
 *
 * @author Ben
 */
@Entity
public class PIN implements Serializable {
   
   
    private Long PINid;
    private Collection<Cases> cases=
            new ArrayList<Cases>();
    
    public PIN(){}
    public void create(Long PINid){
        this.setId(PINid);
    }
    
    @OneToMany(cascade={CascadeType.PERSIST})
    public Collection<Cases> getCases(){
        return cases;
    }
    
    public void setCases(Collection<Cases> cases){
        this.cases=cases;
    }
    @Id
    public Long getId() {
        return PINid;
    }

    public void setId(Long PINid) {
        this.PINid = PINid;
    }

    
    
}
